package tech.aistar.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import tech.aistar.entity.House;
import tech.aistar.entity.Image;

import java.util.List;

public interface ImageMapper {
    @Select("select * from image")
    List<Image> selectAll();

    @Insert("insert into image values(houseId,picture)")
    void insert(Image image);
    @Update("update image set house_id=#{houseId},picture=#{picture} where id=#{Id}")
    void  updateByPrimaryKey(Image image);

    @Delete("delete from image where id=#{Id}")
    void deleteByPrimaryKey(Integer id);
}
